import request from '@/utils/request'

// 查询提现申请列表
export function listWithdraw(query) {
  return request({
    url: '/apartment/withdraw/detail-list',
    method: 'get',
    params: query
  })
}

// 查询提现申请详细
export function getWithdraw(withdrawId) {
  return request({
    url: '/apartment/withdraw/' + withdrawId,
    method: 'get'
  })
}

// 审核提现申请
export function auditWithdraw(withdrawId, data) {
  return request({
    url: '/apartment/withdraw/audit/' + withdrawId,
    method: 'put',
    params: data
  })
}

// 获取关联账单列表
export function getAssociateBills(withdrawId, query) {
  return request({
    url: '/apartment/withdraw/associate-bills/' + withdrawId,
    method: 'get',
    params: query
  })
}

// 删除提现申请
export function delWithdraw(withdrawId) {
  return request({
    url: '/apartment/withdraw/' + withdrawId,
    method: 'delete'
  })
}

// 导出提现申请数据
export function exportWithdraw(query) {
  return request({
    url: '/apartment/withdraw/export',
    method: 'get',
    params: query
  })
}

// 确认打款
export function confirmPayment(withdrawId, data) {
  return request({
    url: '/apartment/withdraw/confirm-payment/' + withdrawId,
    method: 'put',
    params: data
  })
} 